<template>
  <a-modal
    v-model:visible="visible"
    :closable="false"
    :maskClosable="false"
    :footer="null"
  >
    <a-typography-title
      >安顺职业技术学院 考证在线报名收费系统</a-typography-title
    >
    <a-divider>登录方式</a-divider>
    <WechatOutlined @click="toScan"/>
  </a-modal>
</template>

<script>
import { reactive, ref } from "@vue/reactivity";
import { WechatOutlined } from "@ant-design/icons-vue";
export default {
  components: {
    WechatOutlined,
  },
  setup() {
    const visible = ref(true);

    const state = reactive({
        appid:"wx7496665e5f925df9",
        redirect_uri:encodeURIComponent("http://t1.ossjk.com/zyjsxy-miniapp-api/pcWxlogin")
    })

    const toScan = ()=>{
        window.location.href = `https://open.weixin.qq.com/connect/qrconnect?appid=${state.appid}&redirect_uri=${state.redirect_uri}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect`
    }

    return {
      visible,
      toScan
    };
  },
};
</script>

<style>
</style>